import i18n from '@/lang'
export const dictDataObj = {
  fwgsy: ['serviceSaleBelongFlagDictCode', 'service_sale_belong_flag', 'getServiceSaleCateFlagDictCodeData'],
  fwfl: ['serviceSaleCateFlagDictCode', 'service_sale_cate_flag', 'getServiceSaleBelongFlagDictCodeData'],
  examUrl: ['serviceSaleExamCodeDictCode', 'service_sale_exam_code', 'getServiceSaleExamCodeDictCodeData']
}
export const serviceColumns = [
  {
    title: i18n.t('serviceCode'),
    dataIndex: 'serviceCode',
    width: 140,
    special: true,
    scopedSlots: { customRender: 'serviceDetail' }
  },
  {
    title: i18n.t('serviceName'),
    dataIndex: 'serviceName',
    width: 140,
    special: true,
    scopedSlots: { customRender: 'serviceDetail' }
  },
  {
    title: i18n.t('fwgsy'),
    dataIndex: 'serviceBelong',
    width: 110,
    special: true,
    scopedSlots: { customRender: 'fwgsy' }
  },
  {
    title: i18n.t('fwfl'),
    dataIndex: 'serviceCategory',
    width: 110,
    special: true,
    scopedSlots: { customRender: 'fwfl' }
  },
  {
    title: i18n.t('needToLearn'),
    dataIndex: 'needStudy',
    width: 90,
    special: true,
    scopedSlots: { customRender: 'needToLearn' }
  },
  {
    slots: { title: 'connectedModelsTile' },
    titleName: i18n.t('connectedModel'),
    dataIndex: 'totalRelateModel',
    width: 110,
    special: true,
    sorter: true,
    scopedSlots: { customRender: 'yglcx' }
  },
  {
    slots: { title: 'yglcxTile' },
    titleName: i18n.t('managedModel'),
    dataIndex: 'totalManageModel',
    width: 110,
    special: true,
    sorter: true,
    scopedSlots: { customRender: 'yglcx' }
  },

  {
    title: i18n.t('timeOfCreation'),
    dataIndex: 'createTime',
    width: 160,
    sorter: true,
    special: true,
    scopedSlots: { customRender: 'createTime' }
  },
  {
    title: i18n.t('creator'),
    dataIndex: 'createBy',
    width: 90,
    scopedSlots: { customRender: 'creator' }
  },
  {
    title: i18n.t('operation'),
    width: 230,
    special: true,
    fixed: 'right',
    scopedSlots: { customRender: 'action' }
  }
]

export const templateColumns = [
  {
    title: i18n.t('modelCode'),
    dataIndex: 'modelCode',
    width: 150,
    scopedSlots: { customRender: 'modelCode' }
  },
  {
    title: i18n.t('stereotype'),
    dataIndex: 'stereotype',
    width: 100,
    scopedSlots: { customRender: 'stereotype' }
  },
  {
    title: i18n.t('serviceCode'),
    dataIndex: 'serviceCode',
    width: 150,
    scopedSlots: { customRender: 'serviceCode' }
  },
  {
    title: i18n.t('serviceName'),
    dataIndex: 'serviceName',
    width: 150,
    scopedSlots: { customRender: 'serviceName' }
  },
  {
    title: i18n.t('sfypz'),
    dataIndex: 'sfypz',
    width: 100,
    scopedSlots: { customRender: 'sfypz' }
  },
  {
    title: i18n.t('whetherSold'),
    dataIndex: 'name',
    width: 100,
    scopedSlots: { customRender: 'whetherSold' }
  },
  {
    title: i18n.t('whetherActivated'),
    dataIndex: 'whetherActivated',
    width: 100,
    special: true,
    scopedSlots: { customRender: 'whetherActivated' }
  },
  {
    title: i18n.t('serviceExpireDate'),
    dataIndex: 'serviceExpireDate',
    width: 150,
    special: true,
    scopedSlots: { customRender: 'serviceExpireDate' }
  }
]

export const serviceDetailRelativeModelColumns = [
  {
    title: i18n.t('modelCode'),
    dataIndex: 'modelCode',
    width: 180,
    scopedSlots: { customRender: 'modelCode' }
  },
  {
    title: i18n.t('modelName'),
    dataIndex: 'modelName',
    width: 120,
    scopedSlots: { customRender: 'modelName' }
  },
  {
    title: i18n.t('stereotype'),
    dataIndex: 'trimLevel',
    width: 120,
    scopedSlots: { customRender: 'trimLevel' }
  },
  // {
  //   title: i18n.t('presetOrNot'),
  //   dataIndex: 'enableState',
  //   width: 120,
  //   special: true,
  //   scopedSlots: { customRender: 'yesNoType' }
  // },
  {
    title: i18n.t('销售方式'),
    dataIndex: 'saleState',
    special: true,
    width: 120,
    scopedSlots: { customRender: 'saleState' }
  },
  {
    title: i18n.t('是否需激活'),
    dataIndex: 'activeState',
    special: true,
    width: 120,
    scopedSlots: { customRender: 'yesNoType' }
  },
  {
    title: i18n.t('是否需学习'),
    dataIndex: 'needStudy',
    special: true,
    width: 120,
    scopedSlots: { customRender: 'yesNoType' }
  },
  {
    title: i18n.t('operation'),
    width: 140,
    special: true,
    scopedSlots: { customRender: 'action' }
  }
]
